Developer Documentation

QuickTime 4 API Documentation

Inside Macintosh: QuickTime

Previous | Overview | Contents | Next |

The Fixed-Point and Fixed-Rectangle Structures

The Movie Toolbox matrix functions provide two mechanisms for specifying points and rectangles. Some of the functions work with standard QuickDraw points and rectangles, which use integer values to identify coordinates. Others, such as the TransformFixedRect function (described on TransformFixedRect ), work with points and rectangles whose coordinates are expressed as fixed-point numbers. By using fixed-point numbers in these points and rectangles, the Movie Toolbox can support a greater degree of precision when defining graphic objects.

The FixedPoint data type defines a fixed point. The FixedRect data type defines a fixed rectangle. Note that both of these structures define the x coordinate before the y coordinate. This is different from the standard QuickDraw structures.

struct FixedPoint
{
    Fixed x;        /* point's x coordinate as fixed-point number */
    Fixed y;        /* point's y coordinate as fixed-point number */
};
typedef struct FixedPoint FixedPoint;
x
Defines the point's x coordinate as a fixed-point number.

y
Defines the point's y coordinate as a fixed-point number.

struct FixedRect
{
    Fixed left;         /* x coordinate of upper-left corner */
    Fixed top;          /* y coordinate of upper-left corner */
    Fixed right;        /* x coordinate of lower-right corner */
    Fixed bottom;       /* y coordinate of lower-right corner */
};
typedef struct FixedRect FixedRect;
left
Defines the x coordinate of the upper-left corner of the rectangle as a fixed-point number.

top
Defines the y coordinate of the upper-left corner of the rectangle as a fixed-point number.

right
Defines the x coordinate of the lower-right corner of the rectangle as a fixed-point number.

bottom
Defines the y coordinate of the lower-right corner of the rectangle as a fixed-point number.


© 1999 Apple Computer, Inc.

Previous | Overview | Contents | Next